#ifndef UPDATEWORKER_H
#define UPDATEWORKER_H
#include <QThread>
#include <QTimer>
#include <QDebug>
#include "Protocol.h"

enum InfoType {
    Info_Type,
    Error_Type
};

class UpdateWorker : public QThread
{
    Q_OBJECT

public:
    static UpdateWorker* getInstance();

private:
    UpdateWorker();
    void work();

protected:
    void run();

public slots:
    void startWorkSlot();
    void mcuUpdateCompleteSlot();

signals:
    void syncInfoSignal(int type, QString info);
    void startEnterMcuUpdateSignal(QString path);
    void completeWorkSignal();
};

#endif // UPDATEWORKER_H
